package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 包邮规则
 *
 * @author Administrator
 * @since 2024-07-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("free_delivery")
public class FreeDelivery implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    private String addStaffUid;

    private String addStaffName;

    private String lastStaffUid;

    private String lastStaffName;

    /**
     * 规则名称
     */
    private String name;

    /**
     * 包邮类型 0.到付 1.包邮 2.满金额包邮 3.满数量包邮
     */
    private Integer type;

    private String typeName;

    /**
     * 包邮数量
     */
    private Integer freeNum;

    /**
     * 包邮金额
     */
    private Double freeAmount;

    private Integer enabled;

}
